1. Technical Field
This invention relates in general to digital communications and, more particularly, to a transport packet parser.
2. Description of the Related Art
Over the last few years, digital transmission has become a significant technology in communicating audio and video information. Digital transmission is used in digital satellite systems, high definition television (HDTV), and in DVD (digital versatile disks) to carry audio and video information.
The MPEG-2 (Motion Picture Experts Group) protocol is the most common protocol used in digital audio/video transmission. MPEG-2 compresses video information and provides the transport protocol for communicating the compressed information.
FIG. 1 illustrates a simplified diagram showing the formation of an MPEG-2 transport stream. Audio information is encoded in by audio encoder 10 and video information is encoded by video encoder 12. The output of the audio encoder 10 is digitized audio information and the output of video encoder 12 is digitized video information. The audio encoder 10 and video encoder 12 may compress and modify the information.
The outputs of the audio and video encoders 10 and 12 are coupled to packetizers 14 and 16 which arrange digitized audio and video information into packets for transmission. The audio and video packets may be combined with packets containing data and PSI (Program Specific Information) to form the transport stream. The PSI includes data transmitted for use by the demultiplexer in the receiver. The transport stream may by modulated for transmission via satellites or by local television digital broadcast.
Packets 18 in the transport stream are shown in FIG. 2. Each packet includes a header 20 and a payload 22. For MPEG-2, the header is a 32-bit field and the payload is a 184-byte field.
The packet header 20 is shown in greater detail in FIG. 3. The header 20 comprises a number of fields: an 8-bit sync field 24, a 1-bit transport error field 26, a 1-bit payload unit star indicator field 28, a 1-bit transport priority field 30, a 13-bit PID (packet identifier) field 32, a 2-bit transport scrambling control field 34, a 2-bit adaptation field control field 36 and a 4-bit continuity counter (CC) field 38. Of particular interest is the PID, which is used to identify packets associated with a common stream (i.e., an audio stream or a video stream) and the CC which identifies a position for the packet within the stream identified by the PID.
The transport stream is decoded by a transport demultiplexer (after demodulation, if necessary). The MPEG-2 transport demultiplexer receives the MPEG transport stream and separates the video, audio and services information packets. After decoding, the audio and video packets are placed in respective memory buffers to form a data stream. An audio decoder decodes the MPEG audio stream and produces an analog audio signal. The video decoder decodes the MPEG video stream and produces the video picture.
A key aspect of demultiplexing the transport stream is identifying which stream a packet is associated with. Packets in a common stream share a PID. The continuity counter (CC) identifies the proper position of the packet in a stream. A CC value which is the same as the previous packet of the same PID indicates a duplication or an adaptation field. A CC value which is equal to the previous CC+1 indicates a new packet. Other values may indicate an error in the communication or an allowed discontinuity.
In demultiplexing the transport stream, most systems use a sequential approach to compare the received PID successively with 32 values stored in a PID table. However, due to the high data rate of the MPEG stream (up to 60 Mbits/s) this method requires high processing frequency and complex logic circuitry.
Therefore, a need has arisen for a high speed method and apparatus to search for PIDs in conjunction with a transport stream.